#include <iostream>
#include <climits>

using namespace std;

void yes() {
    cout << "YES" << endl;
}

void no() {
    cout << "NO" << endl;
}

int main() {
    int n, m, a, b;
    while (cin >> n >> m >> a >> b) {
        // 保证a<b
        if (a > b) {
            int tmp = a;
            a = b;
            b = tmp;
        }
        int *s = new int[m];
        int ac = 0, bc = 0;
        int minW = INT_MAX, maxW = 0;
        for (int i = 0; i < m; ++i) {
            cin >> s[i];
            if (s[i] == a) {
                ac = s[i];
            }
            if (s[i] == b) {
                bc = s[i];
            }
            minW = min(minW, s[i]);
            maxW = max(maxW, s[i]);
        }

        // 从已有的蛋糕中选了
        if (ac && bc) {
            if (ac == minW && bc == maxW) {
                yes();
                continue;
            }
            no();
            continue;
        }
        // 至少有一个蛋糕没选中
        int last = n - m;
        if (last <= 0) {
            // 不能再做蛋糕了
            no();
            continue;
        }
        // 有一个蛋糕没选中
        if (ac | bc) {
            if (ac == minW && b > maxW) {
                yes();
                continue;
            }
            if (bc == maxW && a < minW) {
                yes();
                continue;
            }
            no();
            continue;
        }
        // 有两个蛋糕没选中
        if (last > 1) {
            if (a < minW && b > maxW) {
                yes();
                continue;
            }
            no();
            continue;
        }
        no();
    }
}
